Method for establishing association between station and access point, and device

ABSTRACT

Embodiments of the present invention provide a method for establishing an association between a STA and an AP, and the method includes: sending, by the STA, an association request frame to the AP, where the association request frame includes a service type element, and the service type element is used for indicating a sensor service type, an offloading service type, or a hybrid service type to which the STA belongs, where the sensor service type includes a first sensor service or a second sensor service, and the offloading service type includes a first offloading service or a second offloading service; and receiving, by the STA, an association response frame sent by the AP, where the association response frame is generated by the AP after determining, according to the service type element, a service type to which the STA belongs.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2013/074051, filed on Apr. 11, 2013, which claims priority toChinese Patent Application No. 201210132882.8, filed on Apr. 28, 2012,both of which are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to communicationstechnologies, and in particular, to a method for establishing anassociation between a station STA and an access point AP in a wirelesslocal area network, and a station device and an access point device forimplementing the method.

BACKGROUND

Two major types of services, that is, a sensor (sensor) service and anoffloading (offloading) service, that are completely different exist ina current wireless local area network standard (for example, 802.11ah),and their characteristics and network requirements are greatlydifferent. The sensor (sensor) service may also be referred to as asensor type service. Characteristics of the sensor service are that aduty cycle (duty cycle) is long, a transmitted packet is short, and thesensor service is mainly an uplink service. Characteristics of theoffloading service are that a duty cycle is short, many burst servicesexist, a transmitted packet is long, and the offloading service ismainly a downlink service. These two types of services are different; inaddition, one of the two types of services, for example, the sensorservice, may be further subcategorized into a plurality of types. Forexample, sensors of a plurality of applications, such as, an electricitymeter, a water meter, and a fire alarm, may exist in a network, anddifferent types of sensor services obviously have differentcharacteristics and requirements. It is necessary to considerdiscriminately providing different types of services for different typesof services in the network, so as to meet requirements of various typesof services. For example, according to service type differences, anaccess point (Access Point, AP) may determine different maximum idleperiods (Max Idle Period), provide different frame header compressionmethods, determine different DTIM intervals, allocate AIDs, and thelike.

However, currently, a service type is mostly indicated in a signal SIGfield, where one bit in the SIG field is used to indicate a service typeto which currently transmitted data belongs, so as to indicate whetherthe service is a sensor service or an offloading service, butsubcategorization cannot be further performed. For example, the Sensorservice may be categorized into an electricity meter service, a watermeter service, a medical sensor service, and the like according toservice types, or may be subcategorized according to lengths of dutycycles. The offloading service may be categorized into a delay-sensitiveservice, such as a video or an audio, and a delay-insensitive service,such as file download.

SUMMARY

Embodiments of the present invention provide a method for establishingan association between a STA and an AP, where a SIG field is used toindicate a service type and the service type can be subcategorized, toimprove system performance.

A method for establishing an association between a STA and an APincludes:

sending, by the STA, an association request frame to the AP, where theassociation request frame includes a service type element, and theservice type element is used for indicating a sensor service type, anoffloading service type, or another service type to which the STAbelongs, where the sensor service type includes a first sensor serviceor a second sensor service, and the offloading service type includes afirst offloading service or a second offloading service; and

receiving, by the STA, an association response frame sent by the AP,where the association response frame is a response of the AP to theassociation request frame, and the service type element is used by theAP to determine a service type to which the STA belongs.

Further, an embodiment of the present invention further provides anothermethod for establishing an association between a STA and an AP, and themethod includes:

receiving, by the AP, an association request frame sent by the STA,where the association request frame includes a service type element, andthe service type element is used for indicating a sensor service type,an offloading service type, or another service type to which the STAbelongs, where the sensor service type includes a first sensor serviceor a second sensor service, and the offloading service type includes afirst offloading service or a second offloading service;

determining, by the AP according to the service type element in theassociation request frame, a service type to which the STA belongs, andgenerating an association response frame; and

sending, by the AP, the association response frame to the STA.

Further, an embodiment of the present invention further provides astation STA, and the STA includes:

a transmit circuit, configured to send an association request frame toan AP by using an antenna, where the association request frame includesa service type element, and the service type element is used forindicating a sensor service type, an offloading service type, or anotherservice type to which the STA belongs, where the sensor service typeincludes a first sensor service or a second sensor service, and theoffloading service type includes a first offloading service or a secondoffloading service; and

a receive circuit, configured to receive, by using the antenna, anassociation response frame sent by the AP, where the associationresponse frame is a response of the AP to the association request frame,and the service type element is used by the AP to determine a servicetype to which the STA belongs.

Another access point includes:

a receive circuit, configured to receive, by using an antenna, anassociation request frame sent by a STA, where the association requestframe includes a service type element, and the service type element isused for indicating a sensor service type, an offloading service type,or another service type to which the STA belongs, where the sensorservice type includes a first sensor service or a second sensor service,and the offloading service type includes a first offloading service or asecond offloading service;

a processing unit, configured to determine, according to the servicetype element in the association request frame, a service type to whichthe STA belongs, and generate an association response frame; and

a sending circuit, configured to send the association response frame tothe STA by using the antenna.

In the embodiments of the present invention, a STA and an AP cooperateto establish an association by sending an association request frame andresponding with an association response frame. After the association isestablished, it is considered that a link is established, and the STAand the AP can communicate with each other. In the embodiments of thepresent invention, a service type element is added to the associationrequest frame, so as to indicate a specific sensor service type,offloading service type, or hybrid service type, and a service type ofthe STA is indicated by means of subcategorization. In addition, it isavoided that a SIG field is used to carry a service type indication,thereby saving an information overhead.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of an application system according to anembodiment of the present invention;

FIG. 2 is a schematic structural diagram of an association request frameaccording to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a general format of a service typeelement in an association request frame according to an embodiment ofthe present invention;

FIG. 4 is a flowchart of a method for establishing an associationbetween a STA and an AP according to an embodiment of the presentinvention;

FIG. 5 is a flowchart of another method for establishing an associationbetween a STA and an AP according to an embodiment of the presentinvention;

FIG. 6 is a schematic diagram of another format of a service typeelement in an association request frame according to an embodiment ofthe present invention;

FIG. 7 is a schematic diagram of still another format of a service typeelement in an association request frame according to an embodiment ofthe present invention;

FIG. 8 is a schematic diagram of a frame header format of a sensorservice; and

FIG. 9 is a general schematic structural diagram of an access pointdevice according to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly and describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention. Apparently, thedescribed embodiments are merely a part rather than all of theembodiments of the present invention.

An embodiment of the present invention provides a method forestablishing an association between a station (Station, STA) and an AP.In the method in this embodiment of the present invention, the STA maynotify the AP of a subcategorized service type to which the STA belongs,so that a network can adapt to requirements of different types ofservices. Referring to FIG. 1, a wireless local area network includesstations STAs and an access point AP, and in a specific Internet ofThings scenario, a station STA may be integrated on a specificinstrument, such as a water meter or an electricity meter. The STA andthe AP can perform wireless communication after establishing anassociation; and then related operating data on the instrument, such asthe electricity meter or the water meter, may be sent to the AP, and theelectricity meter or the water meter may also receive information ordata sent by the AP.

An association request frame used in the method for establishing anassociation between a STA and an AP in this embodiment of the presentinvention is shown in FIG. 2. In the association request frame, inaddition to a field that is commonly defined, an element (element) isadded in this embodiment of the present invention. For example, the lastcolumn is used for indicating a service type to which a STA sending theassociation request frame belongs, where the element may be referred toas a service type element (Service type element). Further, refer to FIG.3 for a general format of the Service type element in this embodiment ofthe present invention. The service type element includes: an elementidentifier (Element ID) field, a length (Length) field, and aninformation (Information) field with a variable length, where a lengthof each of the element identifier field and the length field is one bytein this embodiment. The Element ID field is used for indicating anidentifier of the element, and a system allocates a specific Element IDto each type of element. Element IDs defined in a standard are numberedfrom 0 to 126, where numbers 17 to 31, 45, 47, 49, and 51 to 126 arecurrently reserved. Therefore, the service type element (Service typeelement) added in this embodiment of the present invention may use anID, which is reserved in the standard and is not allocated, as anelement identifier. That is, a numerical value may be selected from 17to 31, 45, 47, 49, and 51 to 126. The Length field uses a length of onebyte to indicate the number of bytes occupied by the Information field,and the Length field in the Service type element in this embodiment isused for indicating the number of bytes occupied by a Service Typefield. The Information field in the Service type element in thisembodiment is the service type (Service Type) field and is used forindicating the service type to which the STA sending the associationrequest belongs, where a sensor service type, an offloading servicetype, or a hybrid service type may be indicated, and a specific type ofthe sensor service (or the offloading service) may be distinguished. Alength of the field may be designed variable, and a plurality ofindication manners may be considered to ensure that data of differentservice types can be indicated.

Refer to FIG. 4 for a flowchart of a method for establishing anassociation between a STA and an AP according to an embodiment of thepresent invention. The method in this embodiment on a STA side includes:

S401: The STA sends an association request frame to the AP, where theassociation request frame includes a service type element, and theservice type element is used for indicating a sensor service type, anoffloading service type, or another service type to which the STAbelongs, where the sensor service type includes a first sensor serviceor a second sensor service, and the offloading service type includes afirst offloading service or a second offloading service.

S402: The STA receives an association response frame sent by the AP,where the association response frame is a response of the AP to theassociation request frame, and the service type element is used by theAP to determine a service type to which the STA belongs.

Refer to FIG. 5 for a flowchart of another method for establishing anassociation between a STA and an AP according to an embodiment of thepresent invention. The method in this embodiment of the presentinvention on an AP side includes:

S501: The AP receives an association request frame sent by the STA,where the association request frame includes a service type element, andthe service type element is used for indicating a sensor service type,an offloading service type, or another service type to which the STAbelongs, where the sensor service type includes a first sensor serviceor a second sensor service, and the offloading service type includes afirst offloading service or a second offloading service.

S502: The AP determines, according to the service type element in theassociation request frame, a service type to which the STA belongs, andgenerates an association response frame.

S503: The AP sends the association response frame to the STA.

A STA and an AP cooperate to establish an association by sending aassociation request frame and responding with an association responseframe. After the association is established, it is considered that alink is established, and the STA and the AP can communicate with eachother. In this embodiment of the present invention, a service typeelement is added to the association request frame, so as to indicate aspecific sensor service type, offloading service type, or hybrid servicetype, and a service type of the STA is indicated by means ofsubcategorization. In addition, it is avoided that a SIG field is usedto carry a service type indication, thereby saving an informationoverhead.

Further, the AP receives the association request of the STA; learns,according to the Service type element in the received associationrequest frame, the service type to which the STA belongs; and generatesan association identifier (association identifier, AID) to be allocatedto the STA. The AP places, in the association response frame, the AID tobe allocated to the STA and responds to the STA with the associationresponse frame, where the AID is an identity of the STA.

Further, a mapping table between an AID and a service type is generatedin the AP, and the AID to be allocated to the current STA and theservice type of the STA are added to the mapping table. The AP mayperform network optimization by using the mapping table.

In the foregoing method, a frame structure is modified, and a Servicetype element is added to an association request frame to indicate aservice type to which a STA sending the association request belongs. TheService type element, that is, an element used for indicating a servicetype, uses one byte in a Service Type field to indicate the service typeto which the STA sending the association request belongs.

This embodiment of the present invention relates to a method forestablishing an association between a STA and an AP in a wireless localarea network, especially in an 802.11ah scenario. In this embodiment ofthe present invention, in a process of establishing an associationbetween an AP and a STA, the STA notifies the AP of a service type towhich the STA belongs, and the AP may establish a mapping tableaccording to STAs of different service types in the network and AIDsallocated by the AP to these STAs. Therefore, the AP can use a relatedoptimization solution according to the information, to adapt tocharacteristics of STAs of different types in the network and ensurethat requirements of the STAs of different service types in the networkcan be met.

Further, the Information field in the Service type element in thisembodiment of the present invention is the Service Type field and isused for indicating the service type to which the STA sending theassociation request belongs. The Service Type field uses one byte toindicate the service type to which the STA currently sending theassociation request frame belongs. For example, 00000000 is used toindicate that the service type to which the STA currently sending theassociation request frame belongs is a first-type sensor service, suchas a periodic service; 00000001 indicates that the service type to whichthe STA currently sending the association request frame belongs is asecond-type sensor service, such as a medical sensor service; 10000000indicates that the service type to which the STA currently sending theassociation request frame belongs is a first-type offloading service,such as a delay-sensitive service; 10000001 indicates that the servicetype to which the STA currently sending the association request framebelongs is a second-type offloading service, such as a delay-insensitiveservice; 11000000 indicates that the STA belongs to another type ofservice, that the STA supports transmission of the first-type andsecond-type sensor services, and the like. One byte used herein caneffectively indicate a plurality of service types, and not only canindicate a single type of service, but also can indicate another type ofservice, such as a hybrid type of service. One byte may have 256indications. In a specific implementation, refer to the following tablefor an indication method of a service type:

Service Type Category  0-127 Sensor service 128-191 Offloading service192-255 Another type of service

Further, in a case in which there are not many service types, theservice type field in the Service Type element may use a bitmap toindicate a service type. Referring to FIG. 6, one byte has 8 bits bit 0to bit 7, where each bit indicates one service type. When a bit is 1, itindicates that the association request frame indicates the service type,or the association request frame indicates a service type whose value is1 in the service type field. For example, if a value of the service typefield is 00100000, it indicates that the service type of the STA sendingthe association request frame including the service type field is athird-type Sensor service.

In the present invention, a frame structure is modified in a process ofestablishing an association between a STA and an AP in the existing802.11, and a Service type element is added to an association requestframe to indicate a service type to which the STA sending theassociation request belongs. In the present invention, the Service typeelement uses a two-level indication method, where one byte is used in aService Type field to indicate the service type to which the STA sendingthe association request belongs, and one byte is used in a Subtype fieldto indicate subcategorization of the service type.

Further, refer to FIG. 7 for another schematic structural diagram of aService type element according to an embodiment of the presentinvention.

An Information field in the Service type element in this embodimentincludes a Service Type field and a Subtype field, used for indicating aservice type to which a STA sending an association request belongs. Onebyte in the Service Type field in this embodiment is used to indicate afirst-level service type to which the STA currently sending theassociation request frame belongs. For example, 00000000 is used toindicate that the service type to which the STA currently sending theassociation request frame belongs is a sensor type service; 00000001indicates that the service type to which the STA currently sending theassociation request frame belongs is a offloading type service; and00000010 indicates that the service type to which the STA currentlysending the association request frame belongs is a hybrid type serviceof the sensor type service and the offloading type service. Other 3 to255 bits are reserved. The Subtype field indicates subcategorization ofthe types of services in the Service type field. If information in theService Type field indicates the sensor type service, 00000000 in theSubtype field indicates a first-type sensor service, 00000001 indicatesa second-type sensor service, and the like. If information in theService Type field indicates the Offloading service, 00000000 in theSubtype field indicates a first-type offloading service, 00000001indicates a second-type offloading service, and the like. If informationin the Service Type field indicates the hybrid type service, 00000000 inthe Subtype field indicates a first-type hybrid service, 00000001indicates a second-type hybrid service, and the like.

Further, in this embodiment of the present invention, an AID allocationmethod is determined on the basis that the STA indicates the servicetype of the STA to the AP. The AP may allocate different continuous AIDsections to STAs of different service types. For example, a continuousAID is allocated to a STA with an excessively long duty cycle; in thisway, it is highly probable that all bits in this AID section are Os in aTIM (traffic indication map, traffic indication map) in a beacon (beaconframe), thereby improving efficiency of TIM compression. Alternatively,STAs whose duty cycles are synchronous are allocated to a continuousAID; in this way, continuous 1s likely occur in this AID section in aTIM, thereby also improving efficiency of a TIM compression algorithm.

Further, in this embodiment of the present invention, a method forcompressing a sensor service frame header is provided on the basis thatthe STA indicates, to the AP, the service type to which the STA belongs.

A major service of a sensor type node is an uplink service from a STA toan AP in a single hop. Therefore, it may be considered to use acompressed frame header for this type of service.

First, in a process of establishing an association between the STA andthe AP, the STA indicates, to the AP, the service type to which the STAbelongs. When a STA that belongs to the sensor service type needs totransmit uplink data to the AP, a used format of a frame header is shownin FIG. 8, a compressed frame header is used, an RA and a TA aredeleted, and others are reserved, where an address 1 (Address 1)indicates a sending address, namely, an SA; and an address 2 (Address 2)indicates a destination address, namely, a DA.

In the present invention, a frame structure is modified in a process ofestablishing an association between a STA and an AP in the existing802.11, and a Service type element is added to an association requestframe to indicate a service type to which the STA sending theassociation request belongs. In the present invention, a method forquerying for data of a service type in a network is provided on thebasis that the STA indicates, to the AP, the service type to which theSTA belongs, so as to ensure that the data of the service type can bepreferentially accessed.

First, in a process of establishing an association between the STA andthe AP, the STA indicates, to the AP, the service type to which the STAbelongs. When the AP needs to query data of a STA of a service type, forexample, query data of all STAs of an electricity meter type service ina network, the AP broadcasts a query frame in the network, where aformat of the frame is as follows:

FC frame Duration Service Type service FCS frame check control durationtype sequence

The Duration indicates duration required by the query, that is, durationin which a STA of another type not to be queried needs to back off. TheService Type indicates a service type to be queried.

A STA in the network receives the broadcasted query frame; determines,according to the Service Type and a type of the STA, whether data of theSTA is queried; and if not, backs off according to the Duration, whereuplink data transmission is not performed during the backoff, andbackoff time is time obtained by adding the Duration and a SIFS; and ifthe Service Type matches that of the STA, starts to performcontention-based data transmission according to a DCF mechanism.

In this embodiment of the present invention, STAs of different types ofservices are scheduled to ensure that a type of service can bepreferentially accessed, so that an AP obtains data in time. Under theprecondition that a service type is indicated, another potentialoptimized modification solution may be used, for example, schedulingoptimization.

An embodiment of the present invention further provides a device forimplementing the foregoing method, which may be an access point APdevice or a station STA device in a wireless local area network. The APand STA devices can implement steps and procedures in the foregoingmethod embodiments, or in other words, the devices can establishassociation between the AP and the STA according to the foregoing methodembodiments, where all the steps, procedures, and functions can beimplemented on the devices.

Embodiments of the present invention may be applied to an access pointAP base station or a station (terminal) in a wireless local areanetwork. FIG. 9 shows an embodiment of an access point device. However,in some wireless local area networks, the device is an access point or astation; and may be an access point in different specific communication,and may be a station in subsequent communication. In this embodiment, adevice 30 includes a transmit circuit 302, a receive circuit 303, apower controller 304, a decoding processor 305, a processing unit 306, amemory 307, and an antenna 301. The processing unit 306 controls anoperation of the device 30, and the processing unit 306 may also bereferred to as a CPU. The memory 307 may include a read-only memory anda random access memory, and provides an instruction and data to theprocessing unit 306. A part of the memory 307 may further include anon-volatile random access memory (NVRAM). In a specific application,the device 30 may be built in or may be a wireless communicationsdevice, such as a mobile phone; and may further include a carrier thatcontains the transmit circuit 302 and the receive circuit 303, so as toallow data transmission and reception between the device 30 and a remotelocation. The transmit circuit 302 and the receive circuit 303 may becoupled to the antenna 301. Components of the device 30 are coupledtogether by using a bus system 3100, where in addition to a data bus,the bus system 3100 includes a power bus, a control bus, and a statussignal bus. However, for clear description, various types of buses inthe figure are marked as the bus system 3100. The device 30 may furtherinclude the processing unit 306 configured to process a signal, andfurther include the power controller 304 and the decoding processor 305.

The methods disclosed in the foregoing embodiments of the presentinvention may be applied to the decoding processor 305, or in otherwords, may be implemented by the decoding processor 305. The decodingprocessor 305 may be an integrated circuit chip and has a signalprocessing capability. In an implementation process, the steps in theforegoing methods may be implemented by using a hardware integratedlogic circuit in the decoding processor 305, or instructions in the formof software. These instructions may cooperate with the processor 306 forimplementation and control. In practice, the decoding processor 305 maybe integrated with the processor 306 or combined with the processor 306to serve as a processing unit, configured to execute the methodsdisclosed in the embodiments of the present invention. The decodingprocessor or the processor may be a general processor, a digital signalprocessor (DSP), an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), another programmable logiccomponent, a discrete gate, a transistor logic component, or a discretehardware component, which can implement or execute the methods, steps,and logic block diagrams disclosed in the embodiments of the presentinvention. The general processor may be a microprocessor, or theprocessor may also be any conventional processor, decoder, or the like.The steps in the methods disclosed in the embodiments of the presentinvention may be directly implemented by a hardware decoding processor,or may be implemented by combining hardware and software modules in thedecoding processor. The software module may be located in a maturestorage medium in the art, such as a random access memory, a flashmemory, a read-only memory, a programmable read-only memory, anelectrically erasable programmable memory, or a register. The storagemedium is located in the memory 307, and the decoding processor readsinformation in the memory 307 and implements the steps of the foregoingmethods in combination with hardware of the modules 301 to 307.

A station and an access point in the embodiments of the presentinvention are configured to implement the foregoing method embodiments,and all the steps, procedures, or functions in the method embodimentscan be implemented on the devices. The access point or station devicesestablish an association by using the foregoing methods. The methods arespecifically implemented by the station and the access point in theembodiments.

A station in an embodiment of the present invention includes:

a transmit circuit, configured to send an association request frame toan AP by using an antenna, where the association request frame includesa service type element, and the service type element is used forindicating a sensor service type, an offloading service type, or anotherservice type to which the STA belongs, where the sensor service typeincludes a first sensor service or a second sensor service, and theoffloading service type includes a first offloading service or a secondoffloading service; and

a receive circuit, configured to receive, by using the antenna, anassociation response frame sent by the AP, where the associationresponse frame is a response of the AP to the association request frame,and the service type element is used by the AP to determine a servicetype to which the STA belongs.

Further, the service type element in the association request frametransmitted by the transmit circuit includes: an element identifierfield, a length field, and an information field, where the elementidentifier field is used for recording an element identifier of theservice type element, the length field is used for identifying a lengthof the information field, the information field indicates, by using amapping relationship between a value of the information field and aservice type, the service type to which the STA belongs, and the servicetype includes the sensor service type, the offloading service type, or ahybrid service type. Alternatively, the service type element in theassociation request frame transmitted by the transmit circuit includes:an element identifier field, a length field, and an information field,where the element identifier field is used for recording an elementidentifier of the service type element, the length field is used foridentifying a length of the information field, the information field isused for indicating, in a bitmap manner, the service type to which theSTA belongs, and the service type includes the sensor service type, theoffloading service type, or a hybrid service type, where the informationfield comprises n bits, and the service type to which the STA belongs isa service type corresponding to a bit whose value is 1. Alternatively,the service type element in the association request frame transmitted bythe transmit circuit includes: an element identifier field, a lengthfield, and an information field, where the element identifier field isused for recording an element identifier of the service type element,the length field is used for identifying a length of the informationfield, the information field is used for indicating the service type towhich the STA belongs, and the information field includes a Service Typefield and a Subtype field, where the Service Type field is used forindicating a first-level service type to which the STA currently sendingthe association request frame belongs, the Subtype field indicates asubcategorized type of the first-level service type in the Service typefield, and the first-level service type includes the sensor servicetype, the offloading service type, or the hybrid service type. Theservice type element in the association request frame transmitted by thetransmit circuit includes the Subtype field, and the indicating, by theSubtype field, a subcategorized type of the first-level service type inthe Service type field includes: indicating, by a mapping relationshipbetween a value of the Service type field and a service type, thesubcategorized type of the first-level service type; or indicating, bythe Service type field, the subcategorized type of the first-levelservice type in a bitmap manner.

An access point in an embodiment of the present invention includes:

a receive circuit, configured to receive, by using an antenna, anassociation request frame sent by a STA, where the association requestframe includes a service type element, and the service type element isused for indicating a sensor service type, an offloading service type,or another service type to which the STA belongs, where the sensorservice type includes a first sensor service or a second sensor service,and the offloading service type includes a first offloading service or asecond offloading service;

a processing unit, configured to determine, according to the servicetype element in the association request frame, a service type to whichthe STA belongs, and generate an association response frame; and

a sending circuit, configured to send the association response frame tothe STA by using the antenna.

Further, the processing unit is further configured to, afterdetermining, according to the service type element in the associationrequest frame, the service type to which the STA belongs, generate anassociation identifier AID to be allocated to the STA, and place the AIDin the association response frame, where the AID is an identity of theSTA. Further, the processing unit is further configured to record, in amapping table between an AID and a service type, the AID to be allocatedto the STA, where the mapping table is used for optimizing scheduling ofthe STA.

Except the specifically provided circuits, units, and modules in thestation and the access point in the embodiments of the presentinvention, general modules may be correspondingly configured accordingto a system requirement, so as to form mature devices.

In the embodiments of the present invention, a STA and an AP cooperateto establish an association by sending a association request frame andresponding with an association response frame. After the association isestablished, it is considered that a link is established, and the STAand the AP can communicate with each other. In the embodiments of thepresent invention, a service type element is added to the associationrequest frame, so as to indicate a specific sensor service type,offloading service type, or hybrid service type, and a service type ofthe STA is indicated by means of subcategorization. In addition, it isavoided that a SIG field is used to carry a service type indication,thereby saving an information overhead.

What is claimed is:
 1. A method for establishing an association betweena station (STA) and an access point (AP), wherein the method comprises:sending, by the STA, an association request frame to the AP, wherein theassociation request frame comprises a service type element, and theservice type element is used for indicating a sensor service type, anoffloading service type, or another service type to which the STAbelongs, wherein the sensor service type comprises a first sensorservice or a second sensor service, and the offloading service typecomprises a first offloading service or a second offloading service; andreceiving, by the STA, an association response frame sent by the AP,wherein the association response frame is a response of the AP to theassociation request frame, and the service type element is used by theAP to determine a service type to which the STA belongs.
 2. The methodaccording to claim 1, wherein the service type element comprises: anelement identifier field, a length field, and an information field,wherein the element identifier field is used for recording an elementidentifier of the service type element, the length field is used foridentifying a length of the information field, the information fieldindicates, by using a mapping relationship between a value of theinformation field and a service type, the service type to which the STAbelongs, and the service type comprises the sensor service type, theoffloading service type, or a hybrid service type.
 3. The methodaccording to claim 1, wherein the service type element comprises: theelement identifier field, the length field, and the information field,wherein the element identifier field is used for recording the elementidentifier of the service type element, the length field is used foridentifying the length of the information field, the information fieldis used for indicating, in a bitmap manner, the service type to whichthe STA belongs, and the service type comprises the sensor service type,the offloading service type, or the hybrid service type, wherein theinformation field comprises n bits, and the service type to which theSTA belongs is a service type corresponding to a bit whose value is 1.4. The method according to claim 1, wherein the service type elementcomprises: an element identifier field, a length field, and aninformation field, wherein the element identifier field is used forrecording an element identifier of the service type element, the lengthfield is used for identifying a length of the information field, theinformation field is used for indicating the service type to which theSTA belongs, and the information field comprises a Service Type fieldand a Subtype field, wherein the Service Type field is used forindicating a first-level service type to which the STA currently sendingthe association request frame belongs, the Subtype field indicates asubcategorized type of the first-level service type in the Service Typefield, and the first-level service type comprises the sensor servicetype, the offloading service type, or a hybrid service type.
 5. Themethod according to claim 2, wherein a length of the element identifierfield is one byte, a length of the length field is one byte, and theinformation field is a field with a variable length.
 6. The methodaccording to claim 3, wherein n is
 8. 7. The method according to claim4, wherein that the Subtype field indicates a subcategorized type of thefirst-level service type in the Service type field comprises:indicating, by a mapping relationship between a value of the Servicetype field and a service type, the subcategorized type of thefirst-level service type; or indicating, by the Service type field, thesubcategorized type of the first-level service type in a bitmap manner.8. A method for establishing an association between a station (STA) andan access point (AP), wherein the method comprises: receiving, by theAP, an association request frame sent by the STA, wherein theassociation request frame comprises a service type element, and theservice type element is used for indicating a sensor service type, anoffloading service type, or another service type to which the STAbelongs, wherein the sensor service type comprises a first sensorservice or a second sensor service, and the offloading service typecomprises a first offloading service or a second offloading service;determining, by the AP according to the service type element in theassociation request frame, a service type to which the STA belongs, andgenerating an association response frame; and sending, by the AP, theassociation response frame to the STA.
 9. The method according to claim8, wherein after the determining, by the AP according to the servicetype element in the association request frame, a service type to whichthe STA belongs, the AP generates an association identifier (AID) to beallocated to the STA, and places the AID in the association responseframe, wherein the AID is an identity of the STA.
 10. The methodaccording to claim 9, wherein the AP records, in a mapping table betweenan AID and a service type, the AID to be allocated to the STA, whereinthe mapping table is used for optimizing scheduling of the STA.
 11. Astation (STA), wherein the station comprises: a transmit circuit,configured to send an association request frame to an access point (AP)by using an antenna, wherein the association request frame comprises aservice type element, and the service type element is used forindicating a sensor service type, an offloading service type, or anotherservice type to which the STA belongs, wherein the sensor service typecomprises a first sensor service or a second sensor service, and theoffloading service type comprises a first offloading service or a secondoffloading service; and a receive circuit, configured to receive, byusing the antenna, an association response frame sent by the AP, whereinthe association response frame is a response of the AP to theassociation request frame, and the service type element is used by theAP to determine a service type to which the STA belongs.
 12. The stationaccording to claim 11, wherein the service type element in theassociation request frame transmitted by the transmit circuit comprises:an element identifier field, a length field, and an information field,wherein the element identifier field is used for recording an elementidentifier of the service type element, the length field is used foridentifying a length of the information field, the information fieldindicates, by using a mapping relationship between a value of theinformation field and a service type, the service type to which the STAbelongs, and the service type comprises the sensor service type, theoffloading service type, or a hybrid service type.
 13. The stationaccording to claim 11, wherein the service type element in theassociation request frame transmitted by the transmit circuit comprises:an element identifier field, a length field, and an information field,wherein the element identifier field is used for recording an elementidentifier of the service type element, the length field is used foridentifying a length of the information field, the information field isused for indicating, in a bitmap manner, the service type to which theSTA belongs, and the service type comprises the sensor service type, theoffloading service type, or a hybrid service type, wherein theinformation field comprises n bits, and the service type to which theSTA belongs is a service type corresponding to a bit whose value is 1.14. The station according to claim 11, wherein the service type elementin the association request frame transmitted by the transmit circuitcomprises: an element identifier field, a length field, and aninformation field, wherein the element identifier field is used forrecording an element identifier of the service type element, the lengthfield is used for identifying a length of the information field, theinformation field is used for indicating the service type to which theSTA belongs, and the information field comprises a Service Type fieldand a Subtype field, wherein the Service Type field is used forindicating a first-level service type to which the STA currently sendingthe association request frame belongs, the Subtype field indicates asubcategorized type of the first-level service type in the Service typefield, and the first-level service type comprises the sensor servicetype, the offloading service type, or a hybrid service type.
 15. Thestation according to claim 14, wherein the service type element in theassociation request frame transmitted by the transmit circuit comprisesthe Subtype field, and the indicating, by the Subtype field, asubcategorized type of the first-level service type in the Service typefield comprises: indicating, by a mapping relationship between a valueof the Service type field and a service type, the subcategorized type ofthe first-level service type; or indicating, by the Service type field,the subcategorized type of the first-level service type in a bitmapmanner.
 16. An access point (AP), wherein the access point comprises: areceive circuit, configured to receive, by using an antenna, anassociation request frame sent by a station (STA), wherein theassociation request frame comprises a service type element, and theservice type element is used for indicating a sensor service type, anoffloading service type, or another service type to which the STAbelongs, wherein the sensor service type comprises a first sensorservice or a second sensor service, and the offloading service typecomprises a first offloading service or a second offloading service; aprocessing unit, configured to determine, according to the service typeelement in the association request frame, a service type to which theSTA belongs, and generate an association response frame; and a sendingcircuit, configured to send the association response frame to the STA byusing the antenna.
 17. The access point according to claim 16, whereinthe processing unit is further configured to, after determining,according to the service type element in the association request frame,the service type to which the STA belongs, generate an associationidentifier (AID) to be allocated to the STA, and place the AID in theassociation response frame, wherein the AID is an identity of the STA.18. The access point according to claim 16, wherein the processing unitis further configured to record, in a mapping table between an AID and aservice type, the AID to be allocated to the STA, wherein the mappingtable is used for optimizing scheduling of the STA.